What is the yellow stuff in crabs?

The yellow substance found in crabs is called tomalley, which is the hepatopancreas or digestive gland. It is located in the head and serves as both the liver and pancreas of the crab, responsible for filtering out impurities from its food and storing energy. Tomalley is considered a delicacy in some cuisines, while in others it is advised to be consumed in moderation due to its high concentration of cholesterol and toxins. Some people may choose to avoid eating tomalley altogether in order to minimize their intake of potential contaminants.